// 数据库服务接口定义
class DatabaseInterface {
  constructor(config) {
    this.config = config;
  }

  // 连接数据库
  async connect() {
    throw new Error('connect method must be implemented');
  }

  // 断开数据库连接
  async disconnect() {
    throw new Error('disconnect method must be implemented');
  }

  // 执行查询
  async query(sql, params = []) {
    throw new Error('query method must be implemented');
  }

  // 执行插入
  async insert(sql, params = []) {
    throw new Error('insert method must be implemented');
  }

  // 执行更新
  async update(sql, params = []) {
    throw new Error('update method must be implemented');
  }

  // 执行删除
  async delete(sql, params = []) {
    throw new Error('delete method must be implemented');
  }

  // 执行事务
  async transaction(operations) {
    throw new Error('transaction method must be implemented');
  }

  // 初始化表结构
  async initSchema() {
    throw new Error('initSchema method must be implemented');
  }
}

module.exports = DatabaseInterface;